package com.chw.utils;
 
import java.net.URL;

/**
 * 获取配置路径工具类
 *
 */
public class ConfigLocationsUtil
{
	//WEB-INF路径
	private static String WEBINF_PATH;

	/**
	 * 获取WEB-INF的路径
	 * @return
	 */
	public static String getWEBINFPath()
    {
        if (WEBINF_PATH == null)
        {
            URL url = Thread.currentThread().getContextClassLoader().getResource("log4j.xml");
            String web ="/WEB-INF";
            WEBINF_PATH = url.getPath().substring(0, url.getPath().lastIndexOf(web)+web.length());
        }
        return WEBINF_PATH;
    }
}
